﻿<%@ Page Title="搜索" Language="C#" MasterPageFile="~/admin/Site1.master" AutoEventWireup="true"
    CodeBehind="search.aspx.cs" EnableEventValidation="false" Inherits="lcps.Web.Admin.search" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="../My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        function havecheck() {
            if ($("input:checkbox:checked").length > 0)
                return true;
            else {
                alert("没有选中任何行！");
                return false;
            }

        }

        function checkall(ch) {

            $("input:checkbox").attr("checked", ch.checked);
        }
        function Button2_onclick() {
            var col = $("#<%= ddlcol.ClientID%>")[0];
            var rels = $('#<%= ddlrels.ClientID%>')[0];
            var val = $('#<%= txtVal.ClientID%>')[0];
            var $res = $('#<%= lblsql.ClientID%>');
            var rela1 = $("#Radio1")[0];
            var rela2 = $("#Radio2")[0];
            var str = "";
            if (rela1.checked)
            { str = " and "; }
            else
            { str = " or "; }
            if ($res.text() == "") {
                if (col.value == "contractdate" || col.value == "deliverydate" || col.value == "arrivaldate" || col.value == "workdate" || col.value == "drawingplandate" || col.value == "drawingsubmitdate" || col.value == "drawingconfirmdate" || col.value == "planarrivedate" || col.value == "realdate")
                    $res.text(col.value + " " + rels.value + " #" + val.value + "# ");
                else {
                    if (rels.value == "like") {
                        $res.text(col.value + " " + rels.value + " '%" + val.value + "%' ");
                    }
                    else
                        $res.text(col.value + " " + rels.value + " '" + val.value + "' ");
                }


            }
            else {
                if (col.value == "contractdate" || col.value == "deliverydate" || col.value == "arrivaldate" || col.value == "workdate" || col.value == "drawingplandate" || col.value == "drawingsubmitdate" || col.value == "drawingconfirmdate" || col.value == "planarrivedate" || col.value == "realdate")
                    $res.text($res.text() + str + col.value + " " + rels.value + " #" + val.value + "# ");
                else {
                    if (rels.value == "like") {
                        $res.text($res.text() + str + col.value + " " + rels.value + " '%" + val.value + "%' ");
                    }
                    else
                        $res.text($res.text() + str + col.value + " " + rels.value + " '" + val.value + "' ");
                }
            }
            $('#<%= hfsql.ClientID%>').val($res.text());
        }
        function btnclear() {
            $('#<%= lblsql.ClientID%>').text("");
            $('#<%= hfsql.ClientID%>').val("");
        }

        $(function () {
            $('#<%=gwSearch.ClientID %> tr:not(:first):not(:last)').click(function () {
                $(this).css("backgroundColor", "#e3e400").siblings().css("backgroundColor", "#ffffff");
            });
        });

        //设置Datagrid列宽可以被拖动的函数
        function SyDG_moveOnTd(td) {
            if (event.offsetX > td.offsetWidth - 10)
                td.style.cursor = 'w-resize';
            else
                td.style.cursor = 'default';
            if (td.mouseDown != null && td.mouseDown == true) {
                if (td.oldWidth + (event.x - td.oldX) > 0)
                    td.width = td.oldWidth + (event.x - td.oldX);
                td.style.width = td.width;
                td.style.cursor = 'w-resize';

                table = td;
                while (table.tagName != 'TABLE') table = table.parentElement;
                table.width = td.tableWidth + (td.offsetWidth - td.oldWidth); table.style.width = table.width;
            }
        }
        function SyDG_downOnTd(td) {
            if (event.offsetX > td.offsetWidth - 10) {
                td.mouseDown = true;
                td.oldX = event.x;
                td.oldWidth = td.offsetWidth;
                table = td; while (table.tagName != 'TABLE') table = table.parentElement;
                td.tableWidth = table.offsetWidth;
            }
        }

        function getScrollBottom(p_oElem) {
            return p_oElem.scrollHeight - p_oElem.scrollTop - p_oElem.clientHeight;
        }

    
    </script>
    <style type="text/css">
        *
        {
            font-size: 12px;
        }
        .style1
        {
            width: 100%;
        }
        .style2
        {
            text-align: left;
        }
        table.gvc td, th
        {
            border-collapse: collapse;
            border: solid 1px #93c2f1;
        }
        .mybtn
        {
            border: solid 2px #93c2f1;
            font-weight: bold;
        }
      
        .fixedheader 
        {     
            position:relative ; 
            table-layout:fixed;
            background-color:White;
            color:Black;
            top:expression(this.offsetParent.scrollTop -1);   
            z-index: 10;
        } 

        .fixedheader th{text-overflow:ellipsis;overflow:hidden;white-space: nowrap;}
       
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <br />
    <table cellpadding="0" cellspacing="0" class="style1">
        <tr>
            <td class="style2">
                项目：<asp:DropDownList ID="ddltables" runat="server">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="style2">
                列名：<asp:DropDownList ID="ddlcol" runat="server">
                </asp:DropDownList>
                比较符：<asp:DropDownList ID="ddlrels" runat="server">
                    <asp:ListItem>&gt;</asp:ListItem>
                    <asp:ListItem>&gt;=</asp:ListItem>
                    <asp:ListItem>&lt;</asp:ListItem>
                    <asp:ListItem>&lt;=</asp:ListItem>
                    <asp:ListItem>like</asp:ListItem>
                    <asp:ListItem Selected="True">=</asp:ListItem>
                </asp:DropDownList>
                值：<asp:TextBox ID="txtVal" runat="server" Width="104px" ClientIDMode="Static"></asp:TextBox>
                <img onclick="WdatePicker({el:'txtVal'})" src="../My97DatePicker/skin/datePicker.gif"
                    width="16" height="22" align="absmiddle">关系：<input id="Radio1" type="radio" name="rela"
                        checked="checked" value="1" />并且<input id="Radio2" type="radio" name="rela" value="2" />或者<input
                            id="Button2" type="button" value="增加" onclick="return Button2_onclick()" />
                <input id="Button1" type="button" value="清空条件" onclick="btnclear()" />
            </td>
        </tr>
        <tr>
            <td class="style2">
                <asp:HiddenField ID="hfsql" runat="server" />
                <asp:Label ID="lblsql" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="style2">
                <asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="搜索" />
                <asp:Label ID="lblcount" runat="server"></asp:Label>
                &nbsp;<asp:Button ID="btnNo2" runat="server" OnClick="btnNoa_Click" Text="编辑总表" />
                &nbsp;
                <asp:Button ID="btnNo" runat="server" OnClick="btnNo_Click" Text="编辑未到货明细表" />
                &nbsp;<asp:Button ID="btnNo0" runat="server" OnClick="btnNo0_Click" Text="编辑项目物资计划供应表" />
                &nbsp;<asp:Button ID="btnNo1" runat="server" OnClick="btnNo1_Click" Text="编辑项目物资需求及生产情况月报" />
            </td>
        </tr>
        <tr>
            <td class="style2" align="left">
                <asp:GridView ID="gwSearch" runat="server" CssClass="gvc xpTable" AutoGenerateColumns="False"
                    Width="3500px" DataKeyNames="ID" OnRowDeleting="gwSearch_RowDeleting" OnRowEditing="gwSearch_RowEditing"
                    OnRowUpdating="gwSearch_RowUpdating" 
                    OnRowDataBound="gwSearch_RowDataBound" OnRowCancelingEdit="gwSearch_RowCancelingEdit"
                    AllowPaging="True" OnPageIndexChanging="gwSearch_PageIndexChanging" BorderColor="Black"
                    BorderStyle="Solid" BorderWidth="1px" OnRowCommand="gwSearch_RowCommand" OnRowCreated="gwSearch_RowCreated"
                    PageSize="15">
                    <HeaderStyle Font-Bold="True" HorizontalAlign="Center" CssClass="fixedheader"></HeaderStyle>
    
                    <Columns>
                        <asp:TemplateField ShowHeader="False">
                            <ItemTemplate>
                                <asp:LinkButton ID="LinkButton3" runat="server" CommandName="outconfirm">确认函</asp:LinkButton>
                                <asp:LinkButton ID="LinkButton4" runat="server" CommandName="outex">催交函</asp:LinkButton>
                                <asp:LinkButton ID="hy_edit" runat="server" CausesValidation="False" CommandName="Edit"
                                    Text="编辑"></asp:LinkButton>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" CommandName="Update"
                                    Text="更新"></asp:LinkButton>
                                &nbsp;<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Cancel"
                                    Text="取消"></asp:LinkButton>
                            </EditItemTemplate>
                        </asp:TemplateField>
                        <asp:CommandField ShowDeleteButton="True" />
                        <asp:TemplateField HeaderText="序号">
                            <ItemTemplate>
                                <asp:Label ID="lblNum" runat="server"></asp:Label>
                                <asp:Label ID="lblisWarn" runat="server" Text='<%# Bind("isWarn") %>' Visible="False"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="项目编号">
                            <HeaderTemplate>
                                <input id="Checkbox1" type="checkbox" onclick="checkall(this)" />
                                项目编号
                            </HeaderTemplate>
                            <EditItemTemplate>
                                <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("proid") %>'></asp:TextBox>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:CheckBox ID="chku" runat="server" /><asp:Label ID="Label16" runat="server" Text='<%# Bind("proid") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Left" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="bidid" HeaderText="招标计划编号">
                            <ItemStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <asp:BoundField DataField="purchaseid" HeaderText="采购订单号" SortExpression="purchaseid"
                            ItemStyle-HorizontalAlign="Center">
                            <ItemStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <asp:BoundField DataField="usework" HeaderText="需用单位" SortExpression="usework" ItemStyle-HorizontalAlign="Center">
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:BoundField DataField="projectname" HeaderText="项目名称" SortExpression="projectname"
                            ItemStyle-HorizontalAlign="Center">
                            <ItemStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <asp:BoundField DataField="projecttype" HeaderText="项目类型" SortExpression="projecttype"
                            ItemStyle-HorizontalAlign="Center">
                            <ItemStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="供应商名称" SortExpression="supplier">
                            <EditItemTemplate>
                                <asp:DropDownList ID="ddlsupplier" runat="server">
                                </asp:DropDownList>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label4" runat="server" Text='<%# Bind("supplier") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="materiel" HeaderText="物料描述" SortExpression="materiel"
                            ItemStyle-HorizontalAlign="Center">
                            <ItemStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <asp:BoundField DataField="nums" HeaderText="数量" SortExpression="nums" ItemStyle-HorizontalAlign="Center"
                            DataFormatString="{0:F3}">
                            <ItemStyle HorizontalAlign="Right" />
                        </asp:BoundField>
                        <asp:BoundField DataField="unit" HeaderText="单位" SortExpression="unit" ItemStyle-HorizontalAlign="Center">
                            <ItemStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="合同签定日期" SortExpression="contractdate">
                            <EditItemTemplate>
                                <asp:TextBox ID="txtcontractdate" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"contractdate","{0:yyyy-M-d}")%>'
                                    onfocus="WdatePicker({dateFmt:'yyyy-M-d',readOnly:true})"></asp:TextBox>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label5" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"contractdate","{0:yyyy-M-d}") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="合同交货时间" SortExpression="deliverydate">
                            <EditItemTemplate>
                                <asp:TextBox ID="txtdeliverydate" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"deliverydate","{0:yyyy-M-d}") %>'
                                    onfocus="WdatePicker({dateFmt:'yyyy-M-d',readOnly:true})"></asp:TextBox>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="lblcontractdate" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"deliverydate","{0:yyyy-M-d}") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="确定交货期" SortExpression="confirmdate">
                            <EditItemTemplate>
                                <asp:TextBox ID="txtconfirmdate" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"confirmdate","{0:yyyy-M-d}") %>'
                                    onfocus="WdatePicker({dateFmt:'yyyy-M-d',readOnly:true})"></asp:TextBox>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="lblconfirmdate" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"confirmdate","{0:yyyy-M-d}") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="实际到货时间" SortExpression="realdate">
                            <ItemTemplate>
                                <asp:Label ID="lblrealdate" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"realdate","{0:yyyy-M-d}") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                            <ItemStyle HorizontalAlign="Left" />
                            <EditItemTemplate>
                                <asp:TextBox ID="txtrealdate" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"realdate","{0:yyyy-M-d}") %>'
                                    onfocus="WdatePicker({dateFmt:'yyyy-M-d',readOnly:true})"></asp:TextBox>
                            </EditItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="确定交货期预警">
                            <ItemTemplate>
                                <asp:Label ID="lblconfirmDateWarn" runat="server" Text=''></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                            <ItemStyle HorizontalAlign="Left" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="结算时间预警">
                            <ItemTemplate>
                                <asp:Label ID="lblaccountsDateWarn" runat="server" Text=''></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                            <ItemStyle HorizontalAlign="Left" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="项目单位要求到货时间" SortExpression="arrivaldate">
                            <EditItemTemplate>
                                <asp:TextBox ID="txtarrivaldate" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"arrivaldate","{0:yyyy-M-d}") %>'
                                    onfocus="WdatePicker({dateFmt:'yyyy-M-d',readOnly:true})"></asp:TextBox>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label7" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"arrivaldate","{0:yyyy-M-d}") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="办理出入库时间" SortExpression="dealStorageDate">
                            <EditItemTemplate>
                                <asp:TextBox ID="txtdealStorageDate" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"dealStorageDate","{0:yyyy-M-d}") %>'
                                    onfocus="WdatePicker({dateFmt:'yyyy-M-d',readOnly:true})"></asp:TextBox>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="lbldealStorageDate" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"dealStorageDate","{0:yyyy-M-d}") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="需要协调的问题" SortExpression="coordinate">
                            <ItemTemplate>
                                <asp:Label ID="Label2" runat="server" Text='<%# Bind("coordinate") %>'></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:DropDownList ID="ddlcoordinate" runat="server">
                                    <asp:ListItem>无</asp:ListItem>
                                    <asp:ListItem>图纸未确认</asp:ListItem>
                                    <asp:ListItem>未排产</asp:ListItem>
                                    <asp:ListItem>生产进度不能满足合同交货期</asp:ListItem>
                                    <asp:ListItem>现场不具备接收条件</asp:ListItem>
                                    <asp:ListItem>质量缺陷</asp:ListItem>
                                    <asp:ListItem>需项目现场收货</asp:ListItem>
                                </asp:DropDownList>
                            </EditItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="remark" HeaderText="备注" SortExpression="remark" ItemStyle-HorizontalAlign="Center">
                            <ItemStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <asp:BoundField DataField="receivedname" HeaderText="接收人" SortExpression="receivedname"
                            ItemStyle-HorizontalAlign="Center">
                            <ItemStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <asp:BoundField DataField="receivedphone" HeaderText="联系电话" SortExpression="receivedphone"
                            ItemStyle-HorizontalAlign="Center">
                            <ItemStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="供应商联系人" SortExpression="suppliername">
                            <ItemTemplate>
                                <asp:Label ID="Label14" runat="server" Text='<%# Bind("suppliername") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Left" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="联系电话" SortExpression="supplierphone">
                            <ItemTemplate>
                                <asp:Label ID="Label15" runat="server" Text='<%# Bind("supplierphone") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Left" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="项目计划投运时间" SortExpression="workdate">
                            <EditItemTemplate>
                                <asp:TextBox ID="txtworkdate" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"workdate","{0:yyyy-M-d}") %>'
                                    onfocus="WdatePicker({dateFmt:'yyyy-M-d',readOnly:true})"></asp:TextBox>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label8" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"workdate","{0:yyyy-M-d}") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="图纸设计计划完成时间" SortExpression="drawingplandate">
                            <EditItemTemplate>
                                <asp:TextBox ID="txtdrawingplandate" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"drawingplandate","{0:yyyy-M-d}") %>'
                                    onfocus="WdatePicker({dateFmt:'yyyy-M-d',readOnly:true})"></asp:TextBox>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label9" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"drawingplandate","{0:yyyy-M-d}") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="drawingstate" HeaderText="目前图纸设计情况" SortExpression="drawingstate"
                            ItemStyle-HorizontalAlign="Center">
                            <ItemStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="图纸应提交设计单位时间" SortExpression="drawingsubmitdate">
                            <EditItemTemplate>
                                <asp:TextBox ID="txtdrawingsubmitdate" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"drawingsubmitdate","{0:yyyy-M-d}") %>'
                                    onfocus="WdatePicker({dateFmt:'yyyy-M-d',readOnly:true})"></asp:TextBox>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label10" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"drawingsubmitdate","{0:yyyy-M-d}") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="要求设计单位确认时间" SortExpression="drawingconfirmdate">
                            <EditItemTemplate>
                                <asp:TextBox ID="txtdrawingconfirmdate" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"drawingconfirmdate","{0:yyyy-M-d}") %>'
                                    onfocus="WdatePicker({dateFmt:'yyyy-M-d',readOnly:true})"></asp:TextBox>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label11" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"drawingconfirmdate","{0:yyyy-M-d}") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="designstate" HeaderText="设计单位确认情况" SortExpression="designstate"
                            ItemStyle-HorizontalAlign="Center">
                            <ItemStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="主要原材料采购情况" SortExpression="majormaterielpurchase">
                            <EditItemTemplate>
                                <asp:DropDownList ID="ddlmajormaterielpurchase" runat="server">
                                    <asp:ListItem>无</asp:ListItem>
                                    <asp:ListItem>未采购</asp:ListItem>
                                    <asp:ListItem>部分采购</asp:ListItem>
                                    <asp:ListItem>采购完成</asp:ListItem>
                                </asp:DropDownList>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label3" runat="server" Text='<%# Bind("majormaterielpurchase") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Left" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="目前设备生产状态" SortExpression="deviceproductionstate">
                            <EditItemTemplate>
                                <asp:DropDownList ID="txtdeviceproductionstate" runat="server" DataTextField="deviceproductionstate"
                                    DataValueField="deviceproductionstate">
                                    <asp:ListItem>无</asp:ListItem>
                                    <asp:ListItem>未排产</asp:ListItem>
                                    <asp:ListItem>已排产，未生产</asp:ListItem>
                                    <asp:ListItem>正在生产</asp:ListItem>
                                    <asp:ListItem>生产完成待运</asp:ListItem>
                                    <asp:ListItem>已发运，未到货</asp:ListItem>
                                    <asp:ListItem>已发货</asp:ListItem>
                                    <asp:ListItem>已到货</asp:ListItem>
                                </asp:DropDownList>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label1" runat="server" Text='<%# Bind("deviceproductionstate") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Left" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="mothstate" HeaderText="本月生产情况" SortExpression="mothstate"
                            ItemStyle-HorizontalAlign="Center">
                            <ItemStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <asp:BoundField DataField="nextmoth" HeaderText="下月生产计划" SortExpression="nextmoth"
                            ItemStyle-HorizontalAlign="Center">
                            <ItemStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="计划到货时间" SortExpression="planarrivedate">
                            <ItemTemplate>
                                <asp:Label ID="Label12" runat="server" Text='<%# Bind("planarrivedate") %>'></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:TextBox ID="txtplanarrivedate" runat="server" Text='<%# Bind("planarrivedate") %>'></asp:TextBox>
                            </EditItemTemplate>
                            <ItemStyle HorizontalAlign="Left" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="tableid" Visible="False">
                            <ItemTemplate>
                                <asp:Label ID="lbl_tableid" runat="server" Text='<%# Bind("tableid") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle Height="35px" />
                    <PagerSettings FirstPageText="首页" LastPageText="页尾" Mode="NumericFirstLast" NextPageText=" 下一页 "
                        PageButtonCount="5" PreviousPageText="上一页 " />
                    <PagerStyle Font-Bold="True" Font-Size="Large" Font-Strikeout="False" ForeColor="Black"
                        Height="35px" CssClass="mypager" />
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td style="text-align: left; height: 40px;">
                &nbsp;
            </td>
        </tr>
    </table>
    <table cellpadding="0" cellspacing="0" class="style1">
        <tr>
            <td style="text-align: left; height: 20px;">
                <asp:Button ID="btndel" runat="server" Text="删除选定项" OnClientClick="return havecheck()"
                    OnClick="btndel_Click" Width="100px" />
                &nbsp;&nbsp;&nbsp;
                <asp:Button ID="btndeltableid" runat="server" Text="删除选定项目" OnClick="btndeltableid_Click"
                    Width="100px" />
                &nbsp;&nbsp;
                <asp:Button ID="btnUpdateAll" runat="server" Text="更新选定项联系方式" OnClick="btnUpdateAll_Click"
                    Width="133px" />
                &nbsp;&nbsp;
                <asp:RadioButton ID="rdoIsWarnY" runat="server" Checked="True" GroupName="rdoIsWarn"
                    Text="是" />
                <asp:RadioButton ID="rdoIsWarnN" runat="server" GroupName="rdoIsWarn" Text="否" />
                &nbsp;
                <asp:Button ID="btnIsWarn" runat="server" Text="选定项是否预警" OnClick="btnIsWarn_Click"
                    Width="133px" />
            </td>
        </tr>
        <tr>
            <td style="text-align: left; height: 20px;">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td style="text-align: left; height: 20px;">
                <b>批量修改数据</b>
            </td>
        </tr>
        <tr>
            <td style="text-align: left; height: 20px;">
                <table cellpadding="0" cellspacing="0" style="width: 750px">
                    <tr>
                        <td style="width: 120px; text-align: left;">
                            目前设备生产状态：
                        </td>
                        <td style="width: 250px">
                            <asp:CheckBox ID="chbzt" runat="server" />
                            <asp:DropDownList ID="ddlstatus_subUp" runat="server">
                                <asp:ListItem>无</asp:ListItem>
                                <asp:ListItem>未排产</asp:ListItem>
                                <asp:ListItem>已排产，未生产</asp:ListItem>
                                <asp:ListItem>正在生产</asp:ListItem>
                                <asp:ListItem>生产完成待运</asp:ListItem>
                                <asp:ListItem>已发运，未到货</asp:ListItem>
                                <asp:ListItem>已发货</asp:ListItem>
                                <asp:ListItem>已到货</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        <td style="width: 120px; text-align: right;">
                            备注：
                        </td>
                        <td style="width: 230px">
                            <asp:CheckBox ID="chbbz" runat="server" />
                            <asp:TextBox ID="txtbz_subUp" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 120px;" class="style2">
                            需要协调的问题：
                        </td>
                        <td style="width: 250px">
                            <asp:CheckBox ID="chbxt" runat="server" />
                            <asp:DropDownList ID="ddlcoordinate_subUp" runat="server">
                                <asp:ListItem>无</asp:ListItem>
                                <asp:ListItem>图纸未确认</asp:ListItem>
                                <asp:ListItem>未排产</asp:ListItem>
                                <asp:ListItem>生产进度不能满足合同交货期</asp:ListItem>
                                <asp:ListItem>现场不具备接收条件</asp:ListItem>
                                <asp:ListItem>质量缺陷</asp:ListItem>
                                <asp:ListItem>需项目现场收货</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        <td style="width: 120px; text-align: right;">
                            接收人：
                        </td>
                        <td style="width: 250px">
                            <asp:CheckBox ID="chbjsr" runat="server" />
                            <asp:TextBox ID="txtreceivedname_subUp" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 120px;" class="style2">
                            实际到货时间：
                        </td>
                        <td style="width: 250px">
                            <asp:CheckBox ID="chbsj" runat="server" />
                            <asp:TextBox ID="txtrellytime_subUp" runat="server" onclick="WdatePicker({dateFmt:'yyyy-M-d',readOnly:true})"></asp:TextBox>
                        </td>
                        <td style="width: 120px; text-align: right;">
                            计划到货时间：
                        </td>
                        <td style="width: 250px">
                            <asp:CheckBox ID="chbjh" runat="server" />
                            <asp:TextBox ID="txtplanarrivedate_subUp" runat="server" onclick="WdatePicker({dateFmt:'yyyy-M-d',readOnly:true})"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 120px;" class="style2">
                            确定交货期：
                        </td>
                        <td style="width: 250px">
                            <asp:CheckBox ID="chbqdjhq" runat="server" />
                            <asp:TextBox ID="txtconfirmdate_subUp" runat="server" onclick="WdatePicker({dateFmt:'yyyy-M-d',readOnly:true})"></asp:TextBox>
                        </td>
                        <td style="width: 120px; text-align: right;">
                            办理出入库时间：
                        </td>
                        <td style="width: 250px">
                            <asp:CheckBox ID="chbblcrksj" runat="server" />
                            <asp:TextBox ID="txtdealStorage_subUp" runat="server" onclick="WdatePicker({dateFmt:'yyyy-M-d',readOnly:true})"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 120px; text-align: right;">
                            <asp:Button ID="btnsetstatus" runat="server" Text="提交修改" OnClientClick="return havecheck()"
                                OnClick="btnsetstatus_Click" Width="120px" />
                        </td>
                        <td style="width: 250px">
                            &nbsp;
                        </td>
                        <td style="width: 120px; text-align: right;">
                            &nbsp;
                        </td>
                        <td style="width: 250px">
                            &nbsp;
                        </td>
                    </tr>
                </table>
                <br />
            </td>
        </tr>
        <tr>
            <td style="text-align: left;">
            </td>
        </tr>
        <tr>
            <td style="text-align: left; height: 20px;">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td style="text-align: left">
                <asp:Button ID="btn_out4" runat="server" OnClick="btn_out4_Click" Text=" 导出 项目物资供应计划履约明细表（总表）" />
                &nbsp;
                <asp:Button ID="btn_out1" runat="server" OnClick="btn_out1_Click" Text="导出 项目物资供应计划未到货明细表" />
                &nbsp;&nbsp;
                <asp:Button ID="btn_out2" runat="server" OnClick="btn_out2_Click" Text="导出 项目物资供应计划表" />
                &nbsp;&nbsp;
                <asp:Button ID="btn_out3" runat="server" OnClick="btn_out3_Click" Text="导出 已办理出入库未到货明细表" />
            </td>
        </tr>
        <tr>
            <td style="text-align: left; height: 20px;">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td style="text-align: left; height: 20px;">
                <asp:Button ID="btninstore" runat="server" OnClick="btninstore_Click" Text="导入仓库"
                    OnClientClick="return confirm('确定要将这些数据导入仓库吗？')" Width="154px" />
            </td>
        </tr>
    </table>
    <br />
    <br />
</asp:Content>
